#ifndef __THREAD_H__
#define __THREAD_H__

#include <pthread.h>

class Thread
{
    public:
        enum ThreadStatus
        {
            READY,
            RUNNING,
            EXITING,
            EXIT
        };

    public:
        Thread();
        virtual ~Thread(){};

        virtual void start();
        virtual void run(){};
        virtual void stop(){};
        virtual void exit(void* ret_val);

        void setStatus(ThreadStatus status){ m_status = status; }
        ThreadStatus getStatus(){ return m_status; }
        pthread_t getThreadId(){ return m_thread_id; }

    private:
        ThreadStatus m_status;
        pthread_t m_thread_id;
};


void* ThreadProcess(void* thread);

#endif 
